-- GENERATED SPELL FOR [Deathcage Sorcerer] --


function spell0_16308(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(12748,pUnit)
pUnit:RegisterEvent('Sorts_16308', 5309, 1)
end

function spell1_16308(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(20792,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16308', 7000, 1)
end

function Sorts_16308(pUnit, Event)
local choix_sorts_16308 = math.random(0, 1)
if choix_sorts_16308 == 0 then
pUnit:RegisterEvent('spell0_16308', 1, 1)
end
if choix_sorts_16308 == 1 then
pUnit:RegisterEvent('spell1_16308', 1, 1)
end
end

function mob16308_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16308', math.random(1500, 3000), 1)
end

function mob16308_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16308_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16308_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16308, 1, 'mob16308_Action')
RegisterUnitEvent(16308, 2, 'mob16308_Leave')
RegisterUnitEvent(16308, 3, 'mob16308_Kill')
RegisterUnitEvent(16308, 4, 'mob16308_Die')
